#pragma once
#include "base/noncopyable.h"

#include <netinet/in.h>
namespace net_tools::net{

class Socket : net_tools::base::noncopyable{
 public:
  Socket();
  ~Socket();
  int Get_socket(){return socketfd;};
  static void Set_reused(int fd);
  static void Set_noblocked(int fd);

  static void* Stringtonet(const char* ipaddr,void* ret);
  static char* Nettostring(sockaddr_in addr,char* ret);
  static void Set_nodelay(int fd);
 private:
  int socketfd;
};

} // namespace net_tools::net